﻿<UserControl x:Class="MicroFlasher.Views.Settings.DeviceView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:models="clr-namespace:MicroFlasher.Models"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             d:DataContext="{d:DesignInstance models:FlasherConfig}">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <Label Grid.Row="0" Grid.Column="0" Target="{Binding ElementName=Device}">Device</Label>
        <ComboBox Grid.Row="0" Grid.Column="1" x:Name="Device"
                          DisplayMemberPath="Name"
                          ItemsSource="{Binding Path=Devices}" 
                          SelectedItem="{Binding Path=Device, Mode=TwoWay}">
        </ComboBox>

        <Label Grid.Row="1" Grid.Column="0">Flash Size</Label>
        <Label Grid.Row="1" Grid.Column="1" Content="{Binding Path=Device.Flash.Size}" />

        <Label Grid.Row="2" Grid.Column="0">Flash Page Size</Label>
        <Label Grid.Row="2" Grid.Column="1" Content="{Binding Path=Device.Flash.PageSize}" />

        <Label Grid.Row="3" Grid.Column="0">EEPROM Size</Label>
        <Label Grid.Row="3" Grid.Column="1" Content="{Binding Path=Device.Eeprom.Size}" />

        <Label Grid.Row="4" Grid.Column="0">Ram Size</Label>
        <Label Grid.Row="4" Grid.Column="1" Content="{Binding Path=Device.RamSize}" />

    </Grid>
</UserControl>
